import { createRouter, createWebHashHistory } from 'vue-router'
import UploadView from '@/views/UploadView.vue'

const routes = [
  {
    path: '/',
    name: 'UploadView',
    component: UploadView //默认页直接重定向到你要显示的默认页
  },

]
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

// router.beforeEach(function(to,from,next){
//   if(!(to.path == '/login' ||to.path == '/rex' )){
//         alert('跳转登录页面')
//         router.push('/login')
//   }else{
//     next()
//   }
// })

export default router
